<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition>
<form>
	<p:dataTable id="goalDataList"  var="ogoal" value="#{organizationalGoalFinderBoundary}" paginator="true" rows="15" 
        		 paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}" 
        	     paginatorPosition="top" lazy="true" style="width:100%">
	
		<p:column style="width:5%">
  			<p:commandButton icon="ui-icon-search" update=":#{p:component('contentForm')}" 
  			                 actionListener="#{organizationalGoalCRUDBoundary.readGoal(ogoal.title)}" title="View Detail" 
  			                 styleClass="tableButton"/>
  		</p:column>
	      
	  	<p:column headerText="Title" sortBy="#{ogoal.title}" filterBy="#{ogoal.title}">  
			<h:outputText value="#{ogoal.title}" />  
		</p:column>  
	      	
		<p:column headerText="Status" sortBy="#{ogoal.status}" filterBy="#{ogoal.status}"
				   filterOptions="#{organizationalGoalFinderBoundary.stateOptions}">  
			<h:outputText value="#{ogoal.status.name()}" />  
		</p:column> 
		
		<f:facet name="footer">  
            <p:outputLabel value="In total there are #{organizationalGoalFinderBoundary.rowCount} goals with these crieteria."/> 
        </f:facet>
		 
	</p:dataTable>
</form>
</ui:composition>
</html>


 